import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		openid: '',
		session_key: '',
		scorelist: {},
		queStateList: {},
		qrimg:''
	},
	mutations: {
		login(state, payload) {
			state.openid = payload.openid;
			state.session_key = payload.session_key
		},
		setscorelist(state, payload) {
			state.scorelist = payload;
		},
		saveQueState(state, payload) {
			state.queStateList = payload;
		},
		setQrimg(state, payload) {
			state.qrimg = payload;
		},
	}
})

export default store
